<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>axios</title>
  <script type="text/javascript" src="/axios/axios.min.js"></script>

</head>
<body>
<button id="test">请求</button>
<script>
  window.onload = function() {
    let testEL = document.getElementById("test");
    testEL.addEventListener("click", test)
    function test() {
      // 发起一个post请求
      axios({
        method: 'post',
        url: 'http://localhost:8088/basic/zzt',
        data: {
          firstName: 'Fred',
          lastName: 'Flintstone'
        }
      });
    }
  }
</script>
</body>
</html>
